import React, {Component} from 'react'

export default function creatForm(option = {}) {
    return function decorate(WrappedComponent) {
        return class extends Component {
            getFieldDecorator = () => {

            }
            render() {
                const originalProps = this.props

                const provideProps = {
                    form: {
                        getFieldDecorator: this.getFieldDecorator
                    }
                }
                const props = Object.assign({}, originalProps, provideProps)
                return <WrappedComponent {...props} />
            }
        }
    }
}